<form class="layui-form layui-box" action="__SELF__" data-auto="true" method="post" data-confirm="确定要取消编辑吗？" >

    <div class="layui-form-item">
        <label class="layui-form-label">用户账号</label>
        <div class="layui-input-block">
            <if $info and isset($info.username)>
            <input type="text" readonly="" disabled="" name="username" value='{$info.username|default=""}' required="required" title="请输入用户名称" placeholder="请输入用户名称" class="layui-input disabled">
            <else/>
            <input type="text" name="username" value='{$info.username|default=""}' required="required" title="请输入用户名称" placeholder="请输入用户名称" class="layui-input">
            </if>
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">联系手机</label>
        <div class="layui-input-block">
            <input type="tel" autofocus name="phone" value='{$info.phone|default=""}' pattern="^1[3-9][0-9]{9}$" title="请输入联系手机" placeholder="请输入联系手机" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">联系邮箱</label>
        <div class="layui-input-block">
            <input type="text" name="mail" pattern="^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$" value='{$info.mail|default=""}' title="请输入联系邮箱" placeholder="请输入联系邮箱" class="layui-input">
        </div>
    </div>

    <if isset($authorizes)>
    <div class="layui-form-item">
        <label class="layui-form-label">访问授权</label>
        <div class="layui-input-block">
            <foreach name="authorizes" item="authorize">
            <if in_array($authorize['id'],$info['authorize']) >
            <input type="checkbox" checked name="authorize[]" value="{$authorize.id}" title="{$authorize.title}">
            <else/>
            <input type="checkbox" name="authorize[]" value="{$authorize.id}" title="{$authorize.title}">
            </if>
            </foreach>
        </div>
    </div>
    </if>

    <div class="layui-form-item">
        <label class="layui-form-label">用户描述</label>
        <div class="layui-input-block">
            <textarea placeholder="请输入用户描述" title="请输入用户描述" class="layui-textarea" name="desc">{$info.desc|default=""}</textarea>
        </div>
    </div>

    <if isset($info['id'])><input type='hidden' value='{$info.id}' name='id'/></if>
    <if isset($info['type'])>
    <input type='hidden' value='{$info.type}' name='type'/>
    <else/>
    <input type='hidden' value='{$type}' name='type'/>
    </if>
</form>
